#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
int main()
{
	char str[100];
	scanf("%s", str);

	int len = strlen(str);
	char c=0;

	for (int i=0;i<len; i++)
	{
		if ((str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= 'a' && str[i] <= 'z'))
		{
			printf("%c", str[i]);
			c = str[i];
		}
		else if (str[i] <= '9' && str[i] >= '1')
		{
			int d = str[i] - '0';
			int h = 0;
			while (h < d)
			{
				printf("%c", c);
				h++;
			}
		}
	}


	return 0;
}
